//
//  XKMineCardTipView.m
//  xk100
//
//  Created by xiaokang on 2017/6/13.
//  Copyright © 2017年 xiaokang. All rights reserved.
//

#import "XKMineCardTipView.h"

@interface XKMineCardTipView ()
@property (nonatomic, strong) UILabel *tipLabel;
@property (nonatomic, strong) UILabel *subLabel;
@end

@implementation XKMineCardTipView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView {
    self.backgroundColor = [UIColor orangeColor];
    
    _tipLabel = [UILabel getLabWithText:@"您尚未绑定银行卡!" textFont:Font_15 textColor:WhiteColor textAlignment:NSTextAlignmentCenter];
    [self addSubview:_tipLabel];
    _subLabel = [UILabel getLabWithText:@"下拉刷新 或 点击右上角 添加" textFont:Font_15 textColor:WhiteColor textAlignment:NSTextAlignmentCenter];
    [self addSubview:_subLabel];
    
    [_tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20*Scale_W);
        make.right.mas_equalTo(-20*Scale_W);
        make.top.mas_equalTo(self).offset(8*Scale_W);
        make.centerX.mas_equalTo(self);
    }];
    
    [_subLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(_tipLabel);
        make.bottom.mas_equalTo(self).offset(-8*Scale_W);
    }];
}

- (void)setTipString:(NSString *)tipString {
    _tipString = tipString;
    _tipLabel.text = tipString;
}

@end
